//
// BaseHTTPRequest.h
//
// $Id: //base/include/BaseHTTPRequest.h
//
// Library: base
// Package: HTTP
// Module : BaseHTTPRequest
// Author :	Jelin,doitsjz@163.com
// Date	  :	10/30/2012
// 
// Definition of the BaseHTTPRequest class.
//
// Copyright (c) 2012-2012, iGuard.
//


#ifndef BASE_HTTPREQUEST_INCLUDED
#define BASE_HTTPREQUEST_INCLUDED

#include "base.h"
#include "Poco/Net/HTTPRequest.h"
/**
	BaseHTTPRequest class for sending HTTP Request or recving HTTP Request
*/
using Poco::Net::HTTPRequest;


class BASE_API BaseHTTPRequest: public HTTPRequest
{
public:
	BaseHTTPRequest();
	BaseHTTPRequest(const std::string& version);
	BaseHTTPRequest(const std::string& method, const std::string& uri);
	BaseHTTPRequest(const std::string& method, const std::string& uri, const std::string& version);
	virtual ~BaseHTTPRequest();

public:
	void setContentBody(const std::string& body);
	const std::string& getContentBody() const;
	void write(std::ostream& ostr) const;
	void read(std::istream& istr);
	void setMessage(const std::string& message);
	void getMessage(std::string& message);
private:
	std::string _body;
};

#endif